<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>UCARPP: includes/ltm.h File Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">UCARPP
   &#160;<span id="projectnumber">1</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('ltm_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#define-members">Defines</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">includes/ltm.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>rappresenta il livello LTM dell'algoritmo UCARPP  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="graph_8h_source.html">graph.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="operations_8h_source.html">operations.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="solution_8h_source.html">solution.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="tabooState_8h_source.html">tabooState.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="LTMFrequencies_8h_source.html">LTMFrequencies.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="LTMConfiguration_8h_source.html">LTMConfiguration.h</a>&quot;</code><br/>
<code>#include &lt;stdbool.h&gt;</code><br/>
</div><div class="textblock"><div class="dynheader">
Include dependency graph for ltm.h:</div>
<div class="dyncontent">
<div class="center"><img src="ltm_8h__incl.png" border="0" usemap="#includes_2ltm_8h" alt=""/></div>
<map name="includes_2ltm_8h" id="includes_2ltm_8h">
<area shape="rect" id="node3" href="graph_8h.html" title="graph.h" alt="" coords="429,624,493,653"/><area shape="rect" id="node22" href="operations_8h.html" title="operations.h" alt="" coords="477,392,571,421"/><area shape="rect" id="node47" href="solution_8h.html" title="solution.h" alt="" coords="544,315,621,344"/><area shape="rect" id="node53" href="tabooState_8h.html" title="tabooState.h" alt="" coords="931,315,1027,344"/><area shape="rect" id="node56" href="LTMFrequencies_8h.html" title="contiene le tabelle delle frequenze di ogni camion" alt="" coords="5,547,136,576"/><area shape="rect" id="node63" href="LTMConfiguration_8h.html" title="LTMConfiguration.h" alt="" coords="652,83,788,112"/><area shape="rect" id="node11" href="edgeID_8h.html" title="edgeID.h" alt="" coords="355,701,429,731"/><area shape="rect" id="node16" href="edgeGraph_8h.html" title="edgeGraph.h" alt="" coords="605,701,701,731"/><area shape="rect" id="node27" href="vehicleState_8h.html" title="vehicleState.h" alt="" coords="604,469,708,499"/><area shape="rect" id="node37" href="gMatrix_8h.html" title="gMatrix.h" alt="" coords="353,469,428,499"/><area shape="rect" id="node41" href="tabooList_8h.html" title="tabooList.h" alt="" coords="788,469,873,499"/><area shape="rect" id="node29" href="vehiclePath_8h.html" title="vehiclePath.h" alt="" coords="597,547,699,576"/><area shape="rect" id="node32" href="edgeSol_8h.html" title="edgeSol.h" alt="" coords="568,624,648,653"/><area shape="rect" id="node43" href="tabooExpire_8h.html" title="tabooExpire.h" alt="" coords="824,624,925,653"/><area shape="rect" id="node58" href="fMatrix_8h.html" title="fMatrix.h" alt="" coords="181,624,253,653"/><area shape="rect" id="node65" href="stm_8h.html" title="stm.h" alt="" coords="732,160,785,189"/><area shape="rect" id="node71" href="los_8h.html" title="los.h" alt="" coords="800,237,851,267"/><area shape="rect" id="node77" href="ALGConfiguration_8h.html" title="ALGConfiguration.h" alt="" coords="891,547,1027,576"/><area shape="rect" id="node82" href="vectorParam_8h.html" title="vectorParam.h" alt="" coords="245,392,352,421"/></map>
</div>
</div>
<p><a href="ltm_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ltm_8h.html#a5b27d4bf0dd03739514b65e90f5b9816">LTM_SIMPLECONSTR_ADDTENURE</a>&#160;&#160;&#160;0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ltm_8h.html#a20ee94380e2b719f7ed8c10435c3b9d9">LTM_INTENSIFICATION_STM_THRESHOLD</a>&#160;&#160;&#160;0.05</td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="solution_8h.html#a51498378a2ebad2f10298fbf2ad5613c">Psolution</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ltm_8h.html#aa9d456c1f323968a4c4ce1cec9d3264a">executeLTM</a> (<a class="el" href="graph_8h.html#a804cfb50d20c745519ebc5a645437049">Pgraph</a> pgraph, <a class="el" href="LTMConfiguration_8h.html#abc1c59b58cae4387b587a3442fe3f70e">PLTMConfiguration</a> configuration)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ltm_8h.html#aa6f8e3bb22391f8df4a926fd164c8d7b">buildSimpleConstructive</a> (<a class="el" href="graph_8h.html#a804cfb50d20c745519ebc5a645437049">Pgraph</a> pg, <a class="el" href="solution_8h.html#a51498378a2ebad2f10298fbf2ad5613c">Psolution</a> sol, <a class="el" href="tabooState_8h.html#aabdb68ff37c6a806d0a2555b0186c9a8">PtabooState</a> tabooState)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ltm_8h.html#a9301a814a3a05cc11ac546765755b5c3">buildSimpleRandomConstructive</a> (<a class="el" href="graph_8h.html#a804cfb50d20c745519ebc5a645437049">Pgraph</a> pg, <a class="el" href="solution_8h.html#a51498378a2ebad2f10298fbf2ad5613c">Psolution</a> sol, <a class="el" href="tabooState_8h.html#aabdb68ff37c6a806d0a2555b0186c9a8">PtabooState</a> tabooState)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ltm_8h.html#a9a79a8ed933fe552e327bf3fb0bd1926">continueLTM</a> (int currentIteration, int maxIterations)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="solution_8h.html#a51498378a2ebad2f10298fbf2ad5613c">Psolution</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ltm_8h.html#ae9c97d6ca876f18936ab1cc33afcc9e2">buildConstructiveSolution</a> (int LTMiteration, int *K, <a class="el" href="solution_8h.html#a51498378a2ebad2f10298fbf2ad5613c">Psolution</a> STMSolution, <a class="el" href="graph_8h.html#a804cfb50d20c745519ebc5a645437049">Pgraph</a> pgraph, <a class="el" href="tabooState_8h.html#aabdb68ff37c6a806d0a2555b0186c9a8">PtabooState</a> ptabooState, <a class="el" href="LTMFrequencies_8h.html#a52cb653b512033c6e91b4d98b28c8737">PLTMFrequencies</a> fmatrices, int STMiteration, int STMintensification)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ltm_8h.html#a1c98905ca50c944b9b6e45b114a953c9">buildDynamicConstructiveWithLowFrequencyEdges</a> (<a class="el" href="graph_8h.html#a804cfb50d20c745519ebc5a645437049">Pgraph</a> pgraph, <a class="el" href="LTMFrequencies_8h.html#a52cb653b512033c6e91b4d98b28c8737">PLTMFrequencies</a> matrixes, <a class="el" href="solution_8h.html#a51498378a2ebad2f10298fbf2ad5613c">Psolution</a> solution, <a class="el" href="tabooState_8h.html#aabdb68ff37c6a806d0a2555b0186c9a8">PtabooState</a> taboostate, int tenure)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ltm_8h.html#a0b3997db69b7fd73dcd7d66d75e67725">buildDynamicConstructiveWithLowFrequencyEdgesRecursive</a> (int node, <a class="el" href="graph_8h.html#a804cfb50d20c745519ebc5a645437049">Pgraph</a> pgraph, <a class="el" href="fMatrix_8h.html#a4bf905567a82e681e7bd3ce7d2a21745">PfMatrix</a> fmatrix, <a class="el" href="gMatrix_8h.html#a8668af44d44e4df02f8db2210adc4982">PGMatrix</a> gmatrix, int k, <a class="el" href="vehicleState_8h.html#a22da3b197204806711b0084dc72e971a">PvehicleState</a> path, <a class="el" href="tabooList_8h.html#a540c4d1dedf8f8cbe13a89e970c411bb">PtabooList</a> taboolist, int tenure)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ltm_8h.html#a9023851b65fe3f17d32e92f80729eee8">simpleIsTQOK</a> (<a class="el" href="edgeGraph_8h.html#ae9263bc51f20141d45a0d487fbbb9985">PedgeGraph</a> edge, int T, int Q)</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>rappresenta il livello LTM dell'algoritmo UCARPP </p>
<dl class="author"><dt><b>Authors:</b></dt><dd>Koldar, Giskard </dd></dl>
<dl class="date"><dt><b>Date:</b></dt><dd>6 May 2013 </dd></dl>
</div><hr/><h2>Define Documentation</h2>
<a class="anchor" id="a20ee94380e2b719f7ed8c10435c3b9d9"></a><!-- doxytag: member="ltm.h::LTM_INTENSIFICATION_STM_THRESHOLD" ref="a20ee94380e2b719f7ed8c10435c3b9d9" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="ltm_8h.html#a20ee94380e2b719f7ed8c10435c3b9d9">LTM_INTENSIFICATION_STM_THRESHOLD</a>&#160;&#160;&#160;0.05</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>sia A il numero di iterazioni da cui la soluzione STM ritornata dalla funzione executeSTM era considerata ottima dalla stessa e B il numero di iterazioni LOS che l'ultima chiamata STM ha eseguito totalmente. LTM deve decidere se la soluzione riportata da STM sia gia' stata anlizzata a sufficienza oppure no. Questa macro definisce la percentuale minima che A/B deve avere affinché LTM ritenga che la soluzione riportata sia gia' stata intensificata. Per esempio se A=400 e B=1000 la soluzione &amp;Sigma e' gia' stata intensificata da STM sse A&gt;(STM_INTENSIFICATION_THRESHOLD*B) </p>

</div>
</div>
<a class="anchor" id="a5b27d4bf0dd03739514b65e90f5b9816"></a><!-- doxytag: member="ltm.h::LTM_SIMPLECONSTR_ADDTENURE" ref="a5b27d4bf0dd03739514b65e90f5b9816" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="ltm_8h.html#a5b27d4bf0dd03739514b65e90f5b9816">LTM_SIMPLECONSTR_ADDTENURE</a>&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Numero di iterazioni di tenure per gli archi aggiunti nella simpleConstructive. </p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ae9c97d6ca876f18936ab1cc33afcc9e2"></a><!-- doxytag: member="ltm.h::buildConstructiveSolution" ref="ae9c97d6ca876f18936ab1cc33afcc9e2" args="(int LTMiteration, int *K, Psolution STMSolution, Pgraph pgraph, PtabooState ptabooState, PLTMFrequencies fmatrices, int STMiteration, int STMintensification)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="solution_8h.html#a51498378a2ebad2f10298fbf2ad5613c">Psolution</a> <a class="el" href="ltm_8h.html#ae9c97d6ca876f18936ab1cc33afcc9e2">buildConstructiveSolution</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>LTMiteration</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>K</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="solution_8h.html#a51498378a2ebad2f10298fbf2ad5613c">Psolution</a>&#160;</td>
          <td class="paramname"><em>STMSolution</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="graph_8h.html#a804cfb50d20c745519ebc5a645437049">Pgraph</a>&#160;</td>
          <td class="paramname"><em>pgraph</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="tabooState_8h.html#aabdb68ff37c6a806d0a2555b0186c9a8">PtabooState</a>&#160;</td>
          <td class="paramname"><em>ptabooState</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="LTMFrequencies_8h.html#a52cb653b512033c6e91b4d98b28c8737">PLTMFrequencies</a>&#160;</td>
          <td class="paramname"><em>fmatrices</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>STMiteration</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>STMintensification</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>costruisce, in varie maniere, la soluzione costruttiva necessaria per lanciare STM</p>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>LTMiteration&gt;0 </li>
<li>K non NULL </li>
<li>pgraph non NULL </li>
<li>ptaboostate non NULL </li>
<li>fmatrices non NULL </li>
<li>STMSolution non deve essere NULL se LTMiteration&gt;2 </li>
</ul>
</dd></dl>
<dl class="post"><dt><b>Postcondition:</b></dt><dd><ul>
<li>in memoria viene allocata spazio contenente una nuova strututra <a class="el" href="structSolution.html">Solution</a> da <b>deallocare manualmente</b> </li>
<li>ptabooState modificato</li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">LTMiteration</td><td>l'iterazione LTM attuale </td></tr>
    <tr><td class="paramname">K</td><td>un puntatore ad una cella contenente il numero di camion utilizzabili </td></tr>
    <tr><td class="paramname">STMSolution</td><td>indica la soluzione ricavata da una chiamata a executeSTM </td></tr>
    <tr><td class="paramname">pgraph</td><td>il grafo su cui ricavare la soluzione </td></tr>
    <tr><td class="paramname">ptabooState</td><td>lo stato taboo da aggiornare </td></tr>
    <tr><td class="paramname">fmatrices</td><td>la serie di tabelle delle frequenze eventualmente da utilizzare </td></tr>
    <tr><td class="paramname">STMiteration</td><td>il numero di iterazioni LOS eseguite da STM nell'ultima chiamata della funzione <a class="el" href="stm_8h.html#ad3881dbabe44ab983776e7f29adce370">executeSTM()</a> </td></tr>
    <tr><td class="paramname">STMintensification</td><td>il numero di iterazioni LOS per cui la soluzione ritornata da <a class="el" href="stm_8h.html#ad3881dbabe44ab983776e7f29adce370">executeSTM()</a> era considerata ottima </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>una nuova istanza di <a class="el" href="structSolution.html">Solution</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a1c98905ca50c944b9b6e45b114a953c9"></a><!-- doxytag: member="ltm.h::buildDynamicConstructiveWithLowFrequencyEdges" ref="a1c98905ca50c944b9b6e45b114a953c9" args="(Pgraph pgraph, PLTMFrequencies matrixes, Psolution solution, PtabooState taboostate, int tenure)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="ltm_8h.html#a1c98905ca50c944b9b6e45b114a953c9">buildDynamicConstructiveWithLowFrequencyEdges</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="graph_8h.html#a804cfb50d20c745519ebc5a645437049">Pgraph</a>&#160;</td>
          <td class="paramname"><em>pgraph</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="LTMFrequencies_8h.html#a52cb653b512033c6e91b4d98b28c8737">PLTMFrequencies</a>&#160;</td>
          <td class="paramname"><em>matrixes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="solution_8h.html#a51498378a2ebad2f10298fbf2ad5613c">Psolution</a>&#160;</td>
          <td class="paramname"><em>solution</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="tabooState_8h.html#aabdb68ff37c6a806d0a2555b0186c9a8">PtabooState</a>&#160;</td>
          <td class="paramname"><em>taboostate</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>tenure</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>genera una soluzione costruttiva una soluzione che utilizza gli archi che sono stati inseriti nelle soluzioni precedenti il minor numero di volte. La soluzione gneerata gode delle seguenti proprieta': </p>
<ul>
<li>e' formata da soli archi doppi </li>
<li>il percorso parte dal deposito </li>
<li>da ogni nodo percorso possono fuoriuscire una serie di archi doppi </li>
<li>il camion non percorre mai archi che sono gia' stati soddisfatti </li>
<li>il camion soddisfa SEMPRE gli archi da cui transita</li>
</ul>
<p>per esempio il disegno rappresenta una possibile soluzione. Gli archi transitati sono i meno frequenti nello storico delle soluzioni ed il percorso realizzato e' TQOK.</p>
<div align="center">
<img src="dot_inline_dotgraph_1.png" alt="dot_inline_dotgraph_1.png" border="0" usemap="#dot_inline_dotgraph_1.map"/>
<map name="dot_inline_dotgraph_1.map" id="dot_inline_dotgraph_1.map"></map>
</div>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>pgraph non NULL </li>
<li>matrix non NULL </li>
<li>solution non NULL </li>
<li>solution non contiene alcun arco (e' cioe' vuota) </li>
<li>taboostate non NULL </li>
<li>taboostate preferibilmente a tutti valori nulli</li>
</ul>
</dd></dl>
<dl class="post"><dt><b>Postcondition:</b></dt><dd><ul>
<li>in solution e' contenuta la soluzione costruttiva a bassa frequenza </li>
<li>in taboostate gli archi in soluzione costruttiva hanno un TabooExpire pari a tenure</li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pgraph</td><td>il grafo su cui costreuire la soluzione </td></tr>
    <tr><td class="paramname">matrix</td><td>una serie di matrici delle frequenze ognuna associata ad un singolo camion per cui deve essere costruita la soluzione </td></tr>
    <tr><td class="paramname">solution</td><td>un'area di memoria dove inserire la soluzione costruttiva </td></tr>
    <tr><td class="paramname">taboostate</td><td>indica la taboo state da aggiornare quando si inseriscono archi nella soluzione costruttiva </td></tr>
    <tr><td class="paramname">tenure</td><td>indica per quante iterazioni gli archi che compongono la soluzione costruttiva sono in taboo </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a0b3997db69b7fd73dcd7d66d75e67725"></a><!-- doxytag: member="ltm.h::buildDynamicConstructiveWithLowFrequencyEdgesRecursive" ref="a0b3997db69b7fd73dcd7d66d75e67725" args="(int node, Pgraph pgraph, PfMatrix fmatrix, PGMatrix gmatrix, int k, PvehicleState path, PtabooList taboolist, int tenure)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="ltm_8h.html#a0b3997db69b7fd73dcd7d66d75e67725">buildDynamicConstructiveWithLowFrequencyEdgesRecursive</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>node</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="graph_8h.html#a804cfb50d20c745519ebc5a645437049">Pgraph</a>&#160;</td>
          <td class="paramname"><em>pgraph</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="fMatrix_8h.html#a4bf905567a82e681e7bd3ce7d2a21745">PfMatrix</a>&#160;</td>
          <td class="paramname"><em>fmatrix</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="gMatrix_8h.html#a8668af44d44e4df02f8db2210adc4982">PGMatrix</a>&#160;</td>
          <td class="paramname"><em>gmatrix</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>k</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="vehicleState_8h.html#a22da3b197204806711b0084dc72e971a">PvehicleState</a>&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="tabooList_8h.html#a540c4d1dedf8f8cbe13a89e970c411bb">PtabooList</a>&#160;</td>
          <td class="paramname"><em>taboolist</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>tenure</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="aa6f8e3bb22391f8df4a926fd164c8d7b"></a><!-- doxytag: member="ltm.h::buildSimpleConstructive" ref="aa6f8e3bb22391f8df4a926fd164c8d7b" args="(Pgraph pg, Psolution sol, PtabooState tabooState)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="ltm_8h.html#aa6f8e3bb22391f8df4a926fd164c8d7b">buildSimpleConstructive</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="graph_8h.html#a804cfb50d20c745519ebc5a645437049">Pgraph</a>&#160;</td>
          <td class="paramname"><em>pg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="solution_8h.html#a51498378a2ebad2f10298fbf2ad5613c">Psolution</a>&#160;</td>
          <td class="paramname"><em>sol</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="tabooState_8h.html#aabdb68ff37c6a806d0a2555b0186c9a8">PtabooState</a>&#160;</td>
          <td class="paramname"><em>tabooState</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>costruisce una soluzione tramite un semplice algoritmo costruttivo. La soluzione ritornata ha le seguenti caratteristiche: </p>
<ul>
<li>è formata da K percorsi </li>
<li>ogni camion percorre 2 volte (una in andata ed una in ritorno) uno stesso arco </li>
<li>il nodo di partenza e' il nodo deposito</li>
</ul>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>pg non deve essere NULL </li>
<li>pg deve essere stato inizializzato con initGraph o con initCompleteGraph </li>
<li>pg completo (per completarlo usare il metodo <a class="el" href="graph_8h.html#a4c2445aec7362664da1023b4abea4956">dijkstraFiller()</a> ) </li>
<li>pg ha gia' inizializzato i pesi di tempo e capacita' (per inizializzarli utilizzare la funzione <a class="el" href="graph_8h.html#a95d25cb8c150c7b95fbefd505bee28c1">initSmartWeights()</a> ) </li>
<li>tabooState non deve essere NULL </li>
<li>sol contiene una soluzione vuota (nessun arco gia' inserito in soluzione) </li>
</ul>
</dd></dl>
<dl class="post"><dt><b>Postcondition:</b></dt><dd><ul>
<li>la memoria puntata da sol contiene una soluzione costruttiva feasible</li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pg</td><td>indica il grafo cui trovare una soluzione temporanea </td></tr>
    <tr><td class="paramname">sol</td><td>indica la soluzione da compilare </td></tr>
    <tr><td class="paramname">tabooState</td><td>indica una strututra in cui incamerare gli eventuali taboo inseriti nella costruttiva </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a9301a814a3a05cc11ac546765755b5c3"></a><!-- doxytag: member="ltm.h::buildSimpleRandomConstructive" ref="a9301a814a3a05cc11ac546765755b5c3" args="(Pgraph pg, Psolution sol, PtabooState tabooState)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="ltm_8h.html#a9301a814a3a05cc11ac546765755b5c3">buildSimpleRandomConstructive</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="graph_8h.html#a804cfb50d20c745519ebc5a645437049">Pgraph</a>&#160;</td>
          <td class="paramname"><em>pg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="solution_8h.html#a51498378a2ebad2f10298fbf2ad5613c">Psolution</a>&#160;</td>
          <td class="paramname"><em>sol</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="tabooState_8h.html#aabdb68ff37c6a806d0a2555b0186c9a8">PtabooState</a>&#160;</td>
          <td class="paramname"><em>tabooState</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>costruisce una soluzione tramite un semplice algoritmo costruttivo. La soluzione ritornata ha le seguenti caratteristiche: </p>
<ul>
<li>la soluzione consta di K percorsi di camion </li>
<li>ogni percorso di un camion consta di un singolo arco percorso due volte (una in andata ed una in ritorno) </li>
<li>il nodo di partenza e' il nodo deposito </li>
<li>gli archi scelti sono archi totalmente a caso</li>
</ul>
<p>Non è necessario richiamare la funzione <a class="el" href="main-tools_8h.html#a83c832496374390c11c825cfb9500c87">randomize()</a> prima di questa funzione poiché se ne occupa la funzione stessa</p>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>pg non NULL </li>
<li>sol non NULL </li>
<li>sol contiene una soluzione vuota (nessun arco gia' inserito in soluzione) </li>
<li>tabooState non NULL </li>
<li>pg completato tramite <a class="el" href="graph_8h.html#a4c2445aec7362664da1023b4abea4956">dijkstraFiller()</a> </li>
<li>pg contiene pesi già inizializzati tramite la funzione <a class="el" href="graph_8h.html#a95d25cb8c150c7b95fbefd505bee28c1">initSmartWeights()</a> </li>
</ul>
</dd></dl>
<dl class="post"><dt><b>Postcondition:</b></dt><dd><ul>
<li>il puntatore sol contiene una soluzione costruttiva per l'algoritmo UCARPP</li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pg</td><td>il grafo su cui elaborare la soluzione </td></tr>
    <tr><td class="paramname">sol</td><td>un'area di memoria contenente una soluzione perfettamente vuota </td></tr>
    <tr><td class="paramname">tabooState</td><td>la taboostate </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a9a79a8ed933fe552e327bf3fb0bd1926"></a><!-- doxytag: member="ltm.h::continueLTM" ref="a9a79a8ed933fe552e327bf3fb0bd1926" args="(int currentIteration, int maxIterations)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="ltm_8h.html#a9a79a8ed933fe552e327bf3fb0bd1926">continueLTM</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>currentIteration</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>maxIterations</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>indica se il ciclo di iterazione di LTM deve finire oppure no. In pratica è la stopping rule di LTM</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">currentIteration</td><td>l'iterazione corrente di LTM </td></tr>
    <tr><td class="paramname">maxIterations</td><td>iterazioni totali ammissibili a livello LTM </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>TRUE se LTM deve continuare, FALSE altrimenti </dd></dl>

</div>
</div>
<a class="anchor" id="aa9d456c1f323968a4c4ce1cec9d3264a"></a><!-- doxytag: member="ltm.h::executeLTM" ref="aa9d456c1f323968a4c4ce1cec9d3264a" args="(Pgraph pgraph, PLTMConfiguration configuration)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="solution_8h.html#a51498378a2ebad2f10298fbf2ad5613c">Psolution</a> <a class="el" href="ltm_8h.html#aa9d456c1f323968a4c4ce1cec9d3264a">executeLTM</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="graph_8h.html#a804cfb50d20c745519ebc5a645437049">Pgraph</a>&#160;</td>
          <td class="paramname"><em>pgraph</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="LTMConfiguration_8h.html#abc1c59b58cae4387b587a3442fe3f70e">PLTMConfiguration</a>&#160;</td>
          <td class="paramname"><em>configuration</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pgraph</td><td></td></tr>
    <tr><td class="paramname">configuration</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd></dd></dl>

</div>
</div>
<a class="anchor" id="a9023851b65fe3f17d32e92f80729eee8"></a><!-- doxytag: member="ltm.h::simpleIsTQOK" ref="a9023851b65fe3f17d32e92f80729eee8" args="(PedgeGraph edge, int T, int Q)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="ltm_8h.html#a9023851b65fe3f17d32e92f80729eee8">simpleIsTQOK</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="edgeGraph_8h.html#ae9263bc51f20141d45a0d487fbbb9985">PedgeGraph</a>&#160;</td>
          <td class="paramname"><em>edge</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>T</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Q</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>verifica se il cammino composto percorrendo 2 volte (una in andata ed una in ritorno) il particolare arco soddisfa i criteri T e Q</p>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>edge non NULL</li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">edge</td><td>l'arco da percorrere 2 volte </td></tr>
    <tr><td class="paramname">T</td><td>la quantita' massima di tempo disponibile per un camion </td></tr>
    <tr><td class="paramname">Q</td><td>la quantita' massima di capacita' disponibile per un camion </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>TRUE se i 2*edge.t&lt;=T e edge.q&lt;=Q; FALSE altrimenti </dd></dl>

</div>
</div>
</div><!-- contents -->
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="ltm_8h.html">ltm.h</a>      </li>

    <li class="footer">Generated on Wed Sep 4 2013 06:38:56 for UCARPP by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6.1 </li>
   </ul>
 </div>


</body>
</html>
